
#ifndef  MEMDB_H
#define  MEMDB_H

#include "common.h"

class Table;

class MemDB {
public:
    MemDB();
    virtual ~MemDB();

    virtual int init(); //create default schema
    virtual void deinit(); // remove default schama

    virtual Table * getTable(const std::string & tableName) const;

    static void test();

protected:
    int insertTable(Table * table);
    int removeTable(const std::string & name);
private:
    std::unordered_map<std::string, Table*> tables;
};



#endif   /* MEMDB_H */
